const nodata = require('../tw-lib-base/no-data/props')
module.exports = {
  dataIsFromPortal: {
    type: Boolean,
    default: false,
    name: '是否从门户获取数据',
    nameTips: '如果从门户获取数据，则数据集无效',
    filedType: 'switch'
  },

  documentId: {
    type: String,
    default: '',
    name: '内容id',
    nameTip: '不填写时将自动从url的查询参数中取documentId',
    filedType: 'string',
    vif: {
      key: 'dataIsFromPortal',
      value: true
    }
  },

  pageId: {
    type: String,
    default: '',
    name: '页面Id',
    nameTip: '可省略，当指定该值时，将取该页面内容列表的第一条内容数据',
    filedType: 'string',
    vif: {
      key: 'dataIsFromPortal',
      value: true
    }
  },

  attchments: {
    type: Array,
    default () {
      return []
    },
    name: '附件列表',
    filedType: 'sync'
  },

  hasTitle: {
    type: Boolean,
    default: true,
    name: '一级标题',
    filedType: 'switch'
  },

  contents: {
    type: Object,
    default () {
      return {
        content: '<p>这是一段文本文本</p>',
        title: '文章一级标题',
        subTitle: '文章二级标题',
        otherInfos: [
          {
            name: '发布时间:',
            value: '2010-09-09'
          },
          {
            name: '发布人:',
            value: '天闻管理员'
          }
        ],
        attchments: [
          {
            name: '附件名称(需带上扩展名).jpg',
            url: '附件url'
          }
        ]
      }
    },
    name: '内容',
    filedType: 'api'
  },

  titleMargin: {
    type: String,
    default: '20px',
    name: '一级标题外边距（下）',
    filedType: 'string',
    vif: {
      key: 'hasTitle',
      value: true
    }
  },

  titleColor: {
    type: String,
    default: '#333',
    name: '一级标题颜色',
    filedType: 'color',
    vif: {
      key: 'hasTitle',
      value: true
    }
  },

  titleFontSize: {
    type: String,
    default: '18px',
    name: '一级标题字体大小',
    filedType: 'string',
    vif: {
      key: 'hasTitle',
      value: true
    }
  },

  titleIsBold: {
    type: Boolean,
    default: true,
    name: '一级标题加粗',
    filedType: 'switch',
    vif: {
      key: 'hasTitle',
      value: true
    }
  },

  titleBgColor: {
    type: String,
    default: 'transparent',
    name: '一级标题背景',
    filedType: 'color',
    vif: {
      key: 'hasTitle',
      value: true
    }
  },

  titlePadding: {
    type: String,
    default: '0px',
    name: '一级标题内边距',
    filedType: 'string',
    vif: {
      key: 'hasTitle',
      value: true
    }
  },

  titleLineHeight: {
    type: String,
    default: '26px',
    name: '一级标题行高',
    filedType: 'string',
    vif: {
      key: 'hasTitle',
      value: true
    }
  },

  titleFontFamily: {
    type: Array,
    default: '微软雅黑',
    name: '一级标题字体',
    filedType: 'select',
    options: [
      {
        name: '微软雅黑',
        value: 'Microsoft YaHei'
      },
      {
        name: '宋体',
        value: '宋体'
      },
      {
        name: '继承父元素',
        value: 'inherit'
      },
      {
        name: 'Arial',
        value: 'Arial'
      },
      {
        name: 'Helvetica Neue',
        value: 'Helvetica Neue'
      },
      {
        name: 'Helvetica',
        value: 'Helvetica'
      }
    ],
    vif: {
      key: 'hasTitle',
      value: true
    }
  },

  titleShadow: {
    type: String,
    default: 'rgba(0, 0, 0, 0)',
    name: '一级标题文本投影色',
    filedType: 'color',
    vif: {
      key: 'hasTitle',
      value: true
    }
  },

  titleAlign: {
    type: String,
    default: 'center',
    name: '一级标题对齐方式',
    filedType: 'select',
    options: [
      {
        name: '左对齐',
        value: 'left'
      },
      {
        name: '居中',
        value: 'center'
      },
      {
        name: '右对齐',
        value: 'right'
      },
      {
        name: '两端对齐',
        value: 'justify'
      }
    ],
    vif: {
      key: 'hasTitle',
      value: true
    }
  },

  hasSubTitle: {
    type: Boolean,
    default: true,
    name: '二级标题',
    filedType: 'switch'
  },

  subTitleColor: {
    type: String,
    default: '#666',
    name: '二级标题颜色',
    filedType: 'color',
    vif: {
      key: 'hasSubTitle',
      value: true
    }
  },

  subTitleFontSize: {
    type: String,
    default: '16px',
    name: '二级标题字体大小',
    filedType: 'string',
    vif: {
      key: 'hasSubTitle',
      value: true
    }
  },

  subTitleIsBold: {
    type: Boolean,
    default: true,
    name: '二级标题加粗',
    filedType: 'switch',
    vif: {
      key: 'hasSubTitle',
      value: true
    }
  },

  subTitleBgColor: {
    type: String,
    default: 'transparent',
    name: '二级标题背景',
    filedType: 'color',
    vif: {
      key: 'hasSubTitle',
      value: true
    }
  },

  subTitlePadding: {
    type: String,
    default: '0px',
    name: '二级标题内边距',
    filedType: 'string',
    vif: {
      key: 'hasSubTitle',
      value: true
    }
  },

  subTitleLineHeight: {
    type: String,
    default: '20px',
    name: '二级标题行高',
    filedType: 'string',
    vif: {
      key: 'hasSubTitle',
      value: true
    }
  },
  subTitleFontFamily: {
    type: Array,
    default: '微软雅黑',
    name: '二级标题字体',
    filedType: 'select',
    options: [
      {
        name: '微软雅黑',
        value: 'Microsoft YaHei'
      },
      {
        name: '宋体',
        value: '宋体'
      },
      {
        name: '继承父元素',
        value: 'inherit'
      },
      {
        name: 'Arial',
        value: 'Arial'
      },
      {
        name: 'Helvetica Neue',
        value: 'Helvetica Neue'
      },
      {
        name: 'Helvetica',
        value: 'Helvetica'
      }
    ],
    vif: {
      key: 'hasSubTitle',
      value: true
    }
  },
  subTitleShadow: {
    type: String,
    default: 'rgba(0, 0, 0, 0)',
    name: '二级标题文本投影色',
    filedType: 'color',
    vif: {
      key: 'hasSubTitle',
      value: true
    }
  },

  subTitleAlign: {
    type: String,
    default: 'center',
    name: '二级标题对齐方式',
    filedType: 'select',
    options: [
      {
        name: '左对齐',
        value: 'left'
      },
      {
        name: '居中',
        value: 'center'
      },
      {
        name: '右对齐',
        value: 'right'
      },
      {
        name: '两端对齐',
        value: 'justify'
      }
    ],
    vif: {
      key: 'hasSubTitle',
      value: true
    }
  },

  subTitleMargin: {
    type: String,
    default: '20px',
    name: '二级标题外边距（下）',
    filedType: 'string',
    vif: {
      key: 'hasSubTitle',
      value: true
    }
  },

  hasOtherInfos: {
    type: Boolean,
    default: true,
    name: '其他信息',
    filedType: 'switch'
  },

  otherInfosColor: {
    type: String,
    default: '#999',
    name: '其他信息颜色',
    filedType: 'color',
    vif: {
      key: 'hasOtherInfos',
      value: true
    }
  },

  otherInfosFontSize: {
    type: String,
    default: '12px',
    name: '其他信息字体大小',
    filedType: 'string',
    vif: {
      key: 'hasOtherInfos',
      value: true
    }
  },

  otherInfosIsBold: {
    type: Boolean,
    default: false,
    name: '其他信息加粗',
    filedType: 'switch',
    vif: {
      key: 'hasOtherInfos',
      value: true
    }
  },

  otherInfosAlign: {
    type: String,
    default: 'left',
    name: '其他信息对齐方式',
    filedType: 'select',
    options: [
      {
        name: '左对齐',
        value: 'left'
      },
      {
        name: '居中',
        value: 'center'
      },
      {
        name: '右对齐',
        value: 'right'
      }
    ],
    vif: {
      key: 'hasOtherInfos',
      value: true
    }
  },

  otherInfosMargin: {
    type: String,
    default: '10px',
    name: '其他信息外边距（下）',
    filedType: 'string',
    vif: {
      key: 'hasOtherInfos',
      value: true
    }
  },

  otherInfoSpace: {
    type: String,
    default: '20px',
    name: '其他信息之间间距',
    filedType: 'string',
    vif: {
      key: 'hasOtherInfos',
      value: true
    }
  },

  contentLineHeight: {
    type: String,
    default: '20px',
    name: '内容行高',
    filedType: 'string'
  },

  contentColor: {
    type: String,
    default: '#333',
    name: '内容颜色',
    filedType: 'color'
  },

  contentFontSize: {
    type: String,
    default: '14px',
    name: '内容字体大小',
    filedType: 'string'
  },

  contentBgColor: {
    type: String,
    default: 'transparent',
    name: '内容背景',
    filedType: 'color'
  },

  attchlinkColor: {
    type: String,
    default: '',
    name: '附件下载链接文本色',
    filedType: 'color'
  },

  ...nodata
}
